package com.ruicar.afs.cloud.bizcommon.algorithm.service;

import com.alibaba.fastjson.JSONObject;
import com.ruicar.afs.cloud.bizcommon.business.dto.CalculatorDTO;
import com.ruicar.afs.cloud.common.core.util.IResponse;

import java.math.BigDecimal;

/**
 * @author yaorui.zhang
 * @version 1.0
 * @Description 算法接口
 * @date create on 2020年6月2日11:09:22
 * @since 1.0
 */
public interface AfsAlgorithmService {

    /**
     * 调用计算器接口，并返回对应还款计划表
     *
     * @param condition
     * @return
     * @author sijun.yu
     */
    public JSONObject calculatePaymentpPlan(CalculatorDTO condition);

    /**
     * 计算贴息金额
     *
     * @param condition
     * @return
     * @author sijun.yu
     */
    public JSONObject calculateDiscount(CalculatorDTO condition);

    /**
     * 通过贴息金额获取客户利率
     *
     * @param condition
     * @return
     * @author sijun.yu
     */
    public IResponse getCustomerRate(CalculatorDTO condition);

    /**
     * 通过list字符串获取IRR
     *
     * @param list
     * @return
     */
    public BigDecimal calIRR(String list);

    /**
     * 摊销计划
     *
     * @param condition
     * @return
     * @author sijun.yu
     */
    public JSONObject getAmortizationMonthPlan(CalculatorDTO condition);

    /**
     * 收入计划
     *
     * @author sijun.yu
     * @param condition
     * @return
     */
    public JSONObject getIncomePlan(CalculatorDTO condition);

}
